//
//  AsyncImageView.h
//  异步请求图片
//
//  Created by markj on 2/18/09.
//  Copyright 2009 Mark Johnson. You have permission to copy parts of this code into your own projects for any use.
//  www.markj.net
//

#import <UIKit/UIKit.h>
@class ASIHTTPRequest;
typedef enum RequestStatus {
	no_Request = -1,//不需要请求
	need_Request = 0,//需要请求
	haveSend_Request = 1,//已经请求过图片
	suc_Request = 0xf1,//网络图片成功获得
	fail_Request = 0xf,//请求网络图片失败
	done_Image =0xf2,//图片处理好了
	layer_Get = 0xf3 //layer 可以取了
}RequestStatus;

@interface AsyncImageView : UIView <ASIHTTPRequestDelegate> {
	UIImageView*  _showImageView;
	UIImage*   p_ImageBuffer;
	ASIHTTPRequest* _imageASIHttpRequest;
	RequestStatus _numStateRequested;// -1:无需要  0:需要  1:请求过了
	id  _imageRequestURL;//数据地址
	BOOL m_BoolSetImage;
    UIActivityIndicatorView* p_ActLoadView;
}
@property BOOL m_BoolSetImage;
@property RequestStatus _numStateRequested;
@property(nonatomic,retain)id _imageRequestURL;


//请求自身目标的 URL图片
- (void)customLoadImageFromURL;

//获得当前图片
-(UIImage*) GetUIImage;

//直接设置某张图片
-(void) SetUIImage :(UIImage*)img;

//更新图片
-(void) initSelfImgView :(UIImage*)img;

-(UIImage*) GetBufferImage;
@end
